<%--
  Created by IntelliJ IDEA.
  User: G
  Date: 2019/5/13
  Time: 23:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="DTO.LocaldataDTO" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改个人信息</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/styles.css">
    <style >
        input::-webkit-input-placeholder {
            color: black;
        }
    </style>
</head>
<body>
<jsp:useBean id="user" class="DTO.LocaldataDTO"/>
<%
    LocaldataDTO localdataDTO=(LocaldataDTO)session.getAttribute("localdataDTO");
%>
<jsp:setProperty name="user" property="password" value="<%=localdataDTO.getPassword()%>"/>

<div class="htmleaf-container">
    <div class="wrapper">
        <div class="container">
            <div class="Content-Main" style="margin-top: -90px">
                <h1 style="text-align: center;">修改个人密码</h1>
                <div style="padding-top: 0px;padding-bottom: 0px;">
                    <form method="post" action="/dgrep" style="padding-top: 0px;height: 40px">
                        <button type="submit" class="button" style="position: absolute;left: 245px" onclick=" return check()">完成</button>
                        <div style="padding-top:80px">
                            <label>
                                <span>old_password:</span>
                                <input type="password"  name="old_password"  id="old_password">
                            </label>
                            <label>
                                <span>new_password:</span>
                                <input type="password"  name="new_password" >
                            </label>
                        </div>
                    </form>
            </div>
        </div>
    </div>
    <ul class="bg-bubbles">
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
    </ul>
</div>
</div>
<script>
    function check(){
        var str= document.getElementById("old_password").value;
        if(str!=${user.password}){
            alert("原始密码输入错误");
            return false;
        }
        else return true;
    }
</script>
</body>
</html>



